package com.such.kit.validate.validator.impl;

import java.util.List;
import com.such.kit.validate.ValidateCommons;
import com.such.kit.validate.validator.Validator;

/**
 * @author SUCH
 * <pre>
 * 检查是否为空校验器
 * </pre>
 */
public class EmptyValidator extends Validator {

	@Override
	protected boolean checkParams(List<String> params) {
		if (params.size() == 0) {
			return true;
		}
		return false;
	}

	@Override
	protected boolean verify(String value, List<String> params) {
		if (ValidateCommons.isEmpty(value)) {
			return true;
		}
		return false;
	}

	@Override
	protected String getVerifyMessage(List<String> params) {
		return "输入内容非空";
	}

}
